<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>添加书籍</title>
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css"
          integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
    <style>
        .container {
            margin-top: 65px;
        }
    </style>
</head>
<body>
<h3>添加书籍</h3>
<div class="container">
    <div class="row">
        <div class="col-md-8 col-md-offset-2">
            <form action="/book/book_add/" method="post">   <!-- action 可以什么都不写，默认发到当前页面 -->
                {% csrf_token %}
                <div class="form-group"><label for="title">书籍名称</label>
                    <input type="text" class="form-control" id="title" placeholder="Title" name="title">
                </div>
                <div class="form-group"><label for="price">价格</label>
                    <input type="text" class="form-control" id="price" placeholder="Price" name="price">
                </div>
                <div class="form-group"><label for="pub_date">出版日期</label>
                    <input type="date" class="form-control" id="pub_date" placeholder="pub_date" name="pub_date">
                </div>
                <div class="form-group">
                    <label for="publisher">出版社</label>
                    <select name="publisher" id="publisher" class="form-control">
                        {% for publisher in publish_list %}d
                            <option value="{{ publisher.pk }}">{{ publisher.publish_name }}</option>
                        {% endfor %}
                    </select>
                </div>
                <div class="form-group">
                    <label for="authors">作者</label>
                    <select name="authors" id="authors" class="form-control" multiple>
                        {% for author in author_list %}
                            <option value="{{ author.pk }}">{{ author.name }}</option>
                        {% endfor %}
                    </select>
                </div>
                <button type="submit" class="btn btn-success pull-right">Submit</button>
            </form>
        </div>
    </div>
</div>
</body>
</html>